﻿@using Abp.Authorization.Users
@using LyyCMS.Web.Models.Common.Modals
@using LyyCMS.Web.Models.Articles
@model EditArticleModalViewModel
@{ Layout = null; }
@await Html.PartialAsync("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("EditUser")))
<form name="UserEditForm" role="form" class="form-horizontal">
    <input type="hidden" name="Id" value="@Model.Article.Id" />
    <div class="modal-body">
        <ul class="nav nav-tabs" role="tablist">
            <li class="nav-item">
                <a class="nav-link active" data-toggle="tab" role="tab" href="#edit-user-details">@L("ArticleDetails")</a>
            </li>
        </ul>
        <div class="tab-content mt-4">
            <div role="tabpanel" class="tab-pane container active" id="edit-user-details">
                <div class="form-group row required">
                    <label class="col-md-3 col-form-label" for="username">@L("Title")</label>
                    <div class="col-md-9">
                        <input id="Title" type="text" class="form-control" name="Title" value="@Model.Article.title" required maxlength="@AbpUserBase.MaxUserNameLength" minlength="2">
                    </div>
                </div>
                <div class="form-group row required">
                    <label class="col-md-3 col-form-label" for="name">@L("Source")</label>
                    <div class="col-md-9">
                        <input id="Source" type="text" class="form-control" name="Source" value="@Model.Article.source" required maxlength="@AbpUserBase.MaxNameLength">
                    </div>
                </div>
                <div class="form-group row required">
                    <label class="col-md-3 col-form-label">@L("Content")</label>
                    <div class="col-md-9">
                        <script id="container" name="Content" type="text/plain" style="width:100%;height:200px;">

                        </script>
                    </div>
                </div>
               
                <div class="form-group row required">
                    <label class="col-md-3 col-form-label">@L("ArticleCategory")</label>
                    <div class="col-md-9">
                        <select id="articleCategoryId" name="articleCategoryId">
                            @foreach (var cate in Model.ArticleCategory)
                            {
                <option value="@cate.Id">@cate.Name </option>}
                        </select>
                    </div>
                </div>
            </div>
        </div>
        @await Html.PartialAsync("~/Views/Shared/Modals/_ModalFooterWithSaveAndCancel.cshtml")
</form>

<script src="~/view-resources/Views/Article/_EditModal.js" asp-append-version="true"></script>
